<?php

$this->breadcrumbs = array(
	$model->label(2) => array('admin'),
	GxHtml::valueEx($model),
);

$this->menu=array(
	array('label'=>UserModule::t('Сохранение') . ' ' . $model->label(), 'url'=>array('create')),
	array('label'=>UserModule::t('Изменение') . ' ' . $model->label(), 'url'=>array('update', 'id' => $model->id)),
//	array('label'=>UserModule::t('Delete') . ' ' . $model->label(), 'url'=>'#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>UserModule::t('Список') . ' ' . $model->label(2), 'url'=>array('admin')),
);
?>

<h1><?php echo UserModule::t('Просмотр') . ' ' . GxHtml::encode($model->label()); ?></h1>
<p class="sub_header_view">
	<label><?php echo UserModule::t('Запись:') . ' ' . GxHtml::encode(GxHtml::valueEx($model)); ?></label>
</p>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data' => $model,
	'attributes' => array(
'id',
'crdate',
'hidden:boolean',
array(
			'name' => 'user',
			'type' => 'raw',
			'value' => $model->user !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->user)), array('users/view', 'id' => GxActiveRecord::extractPkValue($model->user, true))) : null,
			),
array(
			'name' => 'firmTmpl',
			'type' => 'raw',
			'value' => $model->firmTmpl !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->firmTmpl)), array('firmTmpls/view', 'id' => GxActiveRecord::extractPkValue($model->firmTmpl, true))) : null,
			),
'title',
'description',
array(
			'name' => 'city',
			'type' => 'raw',
			'value' => $model->city !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->city)), array('cities/view', 'id' => GxActiveRecord::extractPkValue($model->city, true))) : null,
			),
'address',
array(
			'name' => 'country',
			'type' => 'raw',
			'value' => $model->country !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->country)), array('countries/view', 'id' => GxActiveRecord::extractPkValue($model->country, true))) : null,
			),
array(
			'name' => 'region',
			'type' => 'raw',
			'value' => $model->region !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->region)), array('regions/view', 'id' => GxActiveRecord::extractPkValue($model->region, true))) : null,
			),
'phone',
'active:boolean',
'start_date',
'activated_by',
'end_date',
array(
			'name' => 'rubric',
			'type' => 'raw',
			'value' => $model->rubric !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->rubric)), array('rubrics/view', 'id' => GxActiveRecord::extractPkValue($model->rubric, true))) : null,
			),
array(
			'name' => 'category',
			'type' => 'raw',
			'value' => $model->category !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->category)), array('categories/view', 'id' => GxActiveRecord::extractPkValue($model->category, true))) : null,
			),
'rating_order',
'author_id',
'zip',
	),
)); ?>

<?php if ($model->firmMedias) : ?>
<h2><?php echo GxHtml::encode($model->getRelationLabel('firmMedias')); ?></h2>
<?php
	echo GxHtml::openTag('ul');
	foreach($model->firmMedias as $relatedModel) {
		echo GxHtml::openTag('li');
		echo GxHtml::link(GxHtml::encode(GxHtml::valueEx($relatedModel)), array('firmMedia/view', 'id' => GxActiveRecord::extractPkValue($relatedModel, true)));
		echo GxHtml::closeTag('li');
	}
	echo GxHtml::closeTag('ul');
?><?php endif; ?>
